package cn.com.bsoft.wePortal.config

import cn.com.bsoft.kotlinEx.AllOpen
import cn.com.bsoft.wePortal.config.service.ConfigService
import cn.com.bsoft.wePortal.config.service.DefaultConfigServiceImpl
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.boot.autoconfigure.domain.EntityScan
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.data.jpa.repository.config.EnableJpaRepositories

@AllOpen
@Configuration
@EnableJpaRepositories(basePackages = arrayOf("cn.com.bsoft.wePortal.config.dao"))
@EntityScan("cn.com.bsoft.wePortal.config.entity")
class ConfigServiceConfiguration{

    @Bean
    @ConditionalOnMissingBean
    fun configService(): ConfigService {
        return DefaultConfigServiceImpl()
    }
}